/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import java.awt.BorderLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;

/**
 *
 * @author cesar
 */
public class PanelView extends JPanel {

    JComponent pn;

    public PanelView() {
        setLayout(new BorderLayout());
        pn = new JPanel();
        add(pn, BorderLayout.CENTER);
    }

    public void set(JComponent p) {
        remove(pn);
        pn = p;
        add(pn, BorderLayout.CENTER);
        validate();
        repaint();
    }

    public JComponent get() {
        return pn;
    }
}

